// 导入图标组件
import { App } from 'vue';
import { install } from '../helpers';
import * as Types from './types';
import * as IconManager from './iconManager';
import LocalIcons from '../../../assets/tui-icons';

import TuiIcon from './Icon.vue';
import { animationInstall } from '../animation';

export {
  TuiIcon,
  Types,
  LocalIcons,
  IconManager
};

export const TuiIconComponents = {
  'tui-icon': TuiIcon
};

// 安装函数
export const iconInstall = (app: App) => {
  install(app, TuiIconComponents);
  // 自动初始化图标
  IconManager.initIcons();
  // 安装动画
  animationInstall(app);
};

export * from './Icon.vue';

export default {
  iconInstall,
  IconManager,
  LocalIcons,
  ...TuiIconComponents
};